Optimal. Leaf size=748 \[ -\frac{\sqrt{-a \left (\sqrt{a^2-2 a c+b^2+c^2}+2 c\right )+c \left (\sqrt{a^2-2 a c+b^2+c^2}+c\right )+a^2+b^2} \tan ^{-1}\left (\frac{-b \sqrt{a^2-2 a c+b^2+c^2} \tan (d+e x)+(a-c) \left (-\sqrt{a^2-2 a c+b^2+c^2}+a-c\right )+b^2}{\sqrt{2} \sqrt [4]{a^2-2 a c+b^2+c^2} \sqrt{-a \left (\sqrt{a^2-2 a c+b^2+c^2}+2 c\right )+c \left (\sqrt{a^2-2 a c+b^2+c^2}+c\right )+a^2+b^2} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{2} e \sqrt [4]{a^2-2 a c+b^2+c^2}}+\frac{\sqrt{-a \left (2 c-\sqrt{a^2-2 a c+b^2+c^2}\right )+c \left (c-\sqrt{a^2-2 a c+b^2+c^2}\right )+a^2+b^2} \tanh ^{-1}\left (\frac{b \sqrt{a^2-2 a c+b^2+c^2} \tan (d+e x)+(a-c) \left (\sqrt{a^2-2 a c+b^2+c^2}+a-c\right )+b^2}{\sqrt{2} \sqrt [4]{a^2-2 a c+b^2+c^2} \sqrt{-a \left (2 c-\sqrt{a^2-2 a c+b^2+c^2}\right )+c \left (c-\sqrt{a^2-2 a c+b^2+c^2}\right )+a^2+b^2} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{2} e \sqrt [4]{a^2-2 a c+b^2+c^2}}+\frac{b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{16 c^{5/2} e}-\frac{b (b+2 c \tan (d+e x)) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{8 c^2 e}+\frac{\left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{3 c e}-\frac{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{e}-\frac{b \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{2 \sqrt{c} e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 23.6301, antiderivative size = 748, normalized size of antiderivative = 1., number of steps used = 16, number of rules used = 12, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.364, Rules used = {3700, 6725, 640, 612, 621, 206, 1021, 1078, 1036, 1030, 208, 205} \[ -\frac{\sqrt{-a \left (\sqrt{a^2-2 a c+b^2+c^2}+2 c\right )+c \left (\sqrt{a^2-2 a c+b^2+c^2}+c\right )+a^2+b^2} \tan ^{-1}\left (\frac{-b \sqrt{a^2-2 a c+b^2+c^2} \tan (d+e x)+(a-c) \left (-\sqrt{a^2-2 a c+b^2+c^2}+a-c\right )+b^2}{\sqrt{2} \sqrt [4]{a^2-2 a c+b^2+c^2} \sqrt{-a \left (\sqrt{a^2-2 a c+b^2+c^2}+2 c\right )+c \left (\sqrt{a^2-2 a c+b^2+c^2}+c\right )+a^2+b^2} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{2} e \sqrt [4]{a^2-2 a c+b^2+c^2}}+\frac{\sqrt{-a \left (2 c-\sqrt{a^2-2 a c+b^2+c^2}\right )+c \left (c-\sqrt{a^2-2 a c+b^2+c^2}\right )+a^2+b^2} \tanh ^{-1}\left (\frac{b \sqrt{a^2-2 a c+b^2+c^2} \tan (d+e x)+(a-c) \left (\sqrt{a^2-2 a c+b^2+c^2}+a-c\right )+b^2}{\sqrt{2} \sqrt [4]{a^2-2 a c+b^2+c^2} \sqrt{-a \left (2 c-\sqrt{a^2-2 a c+b^2+c^2}\right )+c \left (c-\sqrt{a^2-2 a c+b^2+c^2}\right )+a^2+b^2} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{2} e \sqrt [4]{a^2-2 a c+b^2+c^2}}+\frac{b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{16 c^{5/2} e}-\frac{b (b+2 c \tan (d+e x)) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{8 c^2 e}+\frac{\left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{3 c e}-\frac{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{e}-\frac{b \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{2 \sqrt{c} e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3700
Rule 6725
Rule 640
Rule 612
Rule 621
Rule 206
Rule 1021
Rule 1078
Rule 1036
Rule 1030
Rule 208
Rule 205
Rubi steps
\begin{align*} \int \tan ^3(d+e x) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{x^3 \sqrt{a+b x+c x^2}}{1+x^2} \, dx,x,\tan (d+e x)\right )}{e}\\ &=\frac{\operatorname{Subst}\left (\int \left (x \sqrt{a+b x+c x^2}-\frac{x \sqrt{a+b x+c x^2}}{1+x^2}\right ) \, dx,x,\tan (d+e x)\right )}{e}\\ &=\frac{\operatorname{Subst}\left (\int x \sqrt{a+b x+c x^2} \, dx,x,\tan (d+e x)\right )}{e}-\frac{\operatorname{Subst}\left (\int \frac{x \sqrt{a+b x+c x^2}}{1+x^2} \, dx,x,\tan (d+e x)\right )}{e}\\ &=-\frac{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{e}+\frac{\left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{3 c e}+\frac{\operatorname{Subst}\left (\int \frac{\frac{b}{2}-(a-c) x-\frac{b x^2}{2}}{\left (1+x^2\right ) \sqrt{a+b x+c x^2}} \, dx,x,\tan (d+e x)\right )}{e}-\frac{b \operatorname{Subst}\left (\int \sqrt{a+b x+c x^2} \, dx,x,\tan (d+e x)\right )}{2 c e}\\ &=-\frac{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{e}-\frac{b (b+2 c \tan (d+e x)) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{8 c^2 e}+\frac{\left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{3 c e}+\frac{\operatorname{Subst}\left (\int \frac{b+(-a+c) x}{\left (1+x^2\right ) \sqrt{a+b x+c x^2}} \, dx,x,\tan (d+e x)\right )}{e}-\frac{b \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x+c x^2}} \, dx,x,\tan (d+e x)\right )}{2 e}+\frac{\left (b \left (b^2-4 a c\right )\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+b x+c x^2}} \, dx,x,\tan (d+e x)\right )}{16 c^2 e}\\ &=-\frac{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{e}-\frac{b (b+2 c \tan (d+e x)) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{8 c^2 e}+\frac{\left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{3 c e}-\frac{b \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c \tan (d+e x)}{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{e}+\frac{\left (b \left (b^2-4 a c\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c \tan (d+e x)}{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{8 c^2 e}-\frac{\operatorname{Subst}\left (\int \frac{-b \sqrt{a^2+b^2-2 a c+c^2}+\left (-b^2-(a-c) \left (a-c-\sqrt{a^2+b^2-2 a c+c^2}\right )\right ) x}{\left (1+x^2\right ) \sqrt{a+b x+c x^2}} \, dx,x,\tan (d+e x)\right )}{2 \sqrt{a^2+b^2-2 a c+c^2} e}+\frac{\operatorname{Subst}\left (\int \frac{b \sqrt{a^2+b^2-2 a c+c^2}+\left (-b^2-(a-c) \left (a-c+\sqrt{a^2+b^2-2 a c+c^2}\right )\right ) x}{\left (1+x^2\right ) \sqrt{a+b x+c x^2}} \, dx,x,\tan (d+e x)\right )}{2 \sqrt{a^2+b^2-2 a c+c^2} e}\\ &=-\frac{b \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{2 \sqrt{c} e}+\frac{b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{16 c^{5/2} e}-\frac{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{e}-\frac{b (b+2 c \tan (d+e x)) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{8 c^2 e}+\frac{\left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{3 c e}+\frac{\left (b \left (b^2+(a-c) \left (a-c-\sqrt{a^2+b^2-2 a c+c^2}\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{2 b \sqrt{a^2+b^2-2 a c+c^2} \left (b^2+(a-c) \left (a-c-\sqrt{a^2+b^2-2 a c+c^2}\right )\right )+b x^2} \, dx,x,\frac{-b^2-(a-c) \left (a-c-\sqrt{a^2+b^2-2 a c+c^2}\right )+b \sqrt{a^2+b^2-2 a c+c^2} \tan (d+e x)}{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{e}+\frac{\left (b \left (b^2+(a-c) \left (a-c+\sqrt{a^2+b^2-2 a c+c^2}\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-2 b \sqrt{a^2+b^2-2 a c+c^2} \left (b^2+(a-c) \left (a-c+\sqrt{a^2+b^2-2 a c+c^2}\right )\right )+b x^2} \, dx,x,\frac{-b^2-(a-c) \left (a-c+\sqrt{a^2+b^2-2 a c+c^2}\right )-b \sqrt{a^2+b^2-2 a c+c^2} \tan (d+e x)}{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{e}\\ &=-\frac{\sqrt{a^2+b^2+c \left (c+\sqrt{a^2+b^2-2 a c+c^2}\right )-a \left (2 c+\sqrt{a^2+b^2-2 a c+c^2}\right )} \tan ^{-1}\left (\frac{b^2+(a-c) \left (a-c-\sqrt{a^2+b^2-2 a c+c^2}\right )-b \sqrt{a^2+b^2-2 a c+c^2} \tan (d+e x)}{\sqrt{2} \sqrt [4]{a^2+b^2-2 a c+c^2} \sqrt{a^2+b^2+c \left (c+\sqrt{a^2+b^2-2 a c+c^2}\right )-a \left (2 c+\sqrt{a^2+b^2-2 a c+c^2}\right )} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{2} \sqrt [4]{a^2+b^2-2 a c+c^2} e}-\frac{b \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{2 \sqrt{c} e}+\frac{b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{16 c^{5/2} e}+\frac{\sqrt{a^2+b^2+c \left (c-\sqrt{a^2+b^2-2 a c+c^2}\right )-a \left (2 c-\sqrt{a^2+b^2-2 a c+c^2}\right )} \tanh ^{-1}\left (\frac{b^2+(a-c) \left (a-c+\sqrt{a^2+b^2-2 a c+c^2}\right )+b \sqrt{a^2+b^2-2 a c+c^2} \tan (d+e x)}{\sqrt{2} \sqrt [4]{a^2+b^2-2 a c+c^2} \sqrt{a^2+b^2+c \left (c-\sqrt{a^2+b^2-2 a c+c^2}\right )-a \left (2 c-\sqrt{a^2+b^2-2 a c+c^2}\right )} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{2} \sqrt [4]{a^2+b^2-2 a c+c^2} e}-\frac{\sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{e}-\frac{b (b+2 c \tan (d+e x)) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{8 c^2 e}+\frac{\left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{3 c e}\\ \end{align*}
Mathematica [C] time = 2.34005, size = 451, normalized size = 0.6 \[ \frac{\frac{3 b \left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{4 c^{5/2}}-\frac{3 b (b+2 c \tan (d+e x)) \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}{2 c^2}+\frac{4 \left (a+b \tan (d+e x)+c \tan ^2(d+e x)\right )^{3/2}}{c}-12 \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}+6 \sqrt{a-i b-c} \tanh ^{-1}\left (\frac{2 a+(b-2 i c) \tan (d+e x)-i b}{2 \sqrt{a-i b-c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )+6 \sqrt{a+i b-c} \tanh ^{-1}\left (\frac{2 a+(b+2 i c) \tan (d+e x)+i b}{2 \sqrt{a+i b-c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )-\frac{3 (b-2 i c) \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{c}}-\frac{3 (b+2 i c) \tanh ^{-1}\left (\frac{b+2 c \tan (d+e x)}{2 \sqrt{c} \sqrt{a+b \tan (d+e x)+c \tan ^2(d+e x)}}\right )}{\sqrt{c}}}{12 e} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.401, size = 17766953, normalized size = 23752.6 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{c \tan \left (e x + d\right )^{2} + b \tan \left (e x + d\right ) + a} \tan \left (e x + d\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a + b \tan{\left (d + e x \right )} + c \tan ^{2}{\left (d + e x \right )}} \tan ^{3}{\left (d + e x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]